﻿@{
    Bundle("jquery_validate");
}
           
<script type="text/javascript">
    jQuery(document).ready(function () {
        jQuery('@ID("#form")').validate({
            rules: {
                code: {
                    required: true
                },
                name: {
                    required: true
                }
            }
        });
    });
</script>
<form id="@ID("form")" action="@Url.Action(Loc.Act("Create").Ctrl("Language"))" method="post">
    <input type="hidden" name="flags" value="None" />
    <table>
        <tr>
            <td>
                <label>@T(Res.In("Common").Of("Vocab").Name("Code"))</label>
            </td>
            <td>
                <input type="text" name="code" maxlength="2" />
                <span class="hint">@T(Res.In("WebAdmin").Of("Help").Of("Globalization").Of("Language").Name("Code"))</span>
            </td>
        </tr>
        <tr>
            <td>
                <label>@T(Res.Name("Name"))</label>
            </td>
            <td>
                <input type="text" name="name" maxlength="100" />
            </td>
        </tr>
        <tr>
            <td>
                <label>@T(Res.Name("Direction"))</label>
            </td>
            <td>
                <ul class="bar">
                    <li>
                        <input type="radio" name="flags" value="LTR" checked />
                    </li>
                    <li>
                        <label>@T(Res.In("API").Of("Enum").Of("LanguageFlags").Name("LTR"))</label>
                    </li>
                    <li>
                        <input type="radio" name="flags" value="RTL" />
                    </li>
                    <li>
                        <label>@T(Res.In("API").Of("Enum").Of("LanguageFlags").Name("RTL"))</label>
                    </li>
                </ul>
            </td>
        </tr>
        <tr>
            <td>
                <label>@T(Res.In("API").Of("Enum").Of("LanguageFlags").Name("Active"))</label>
            </td>
            <td>
                <input type="checkbox" name="flags" value="Active" />
            </td>
        </tr>
    </table>
    <ul class="bar toolbar">
        <li><button class="button" type="submit">@T(Res.In("Common").Of("Act").Name("Submit"))</button></li>
    </ul>
</form>
